Left Termination of the query pattern rev_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

rev([], []).
rev(.(X, XS), .(Y, YS)) :- ','(rev1(X, XS, Y), rev2(X, XS, YS)).
rev1(X, [], X).
rev1(X, .(Y, YS), Z) :- rev1(Y, YS, Z).
rev2(X, [], []).
rev2(X, .(Y, YS), ZS) :- ','(rev2(Y, YS, US), ','(rev(US, VS), rev(.(X, VS), ZS))).

Queries:

rev(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
rev_in: (b,f)
rev1_in: (b,b,f)
rev2_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

REV_IN_GA(.(X, XS), .(Y, YS)) → U1_GA(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
REV_IN_GA(.(X, XS), .(Y, YS)) → REV1_IN_GGA(X, XS, Y)
REV1_IN_GGA(X, .(Y, YS), Z) → U3_GGA(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
REV1_IN_GGA(X, .(Y, YS), Z) → REV1_IN_GGA(Y, YS, Z)
U1_GA(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_GA(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
U1_GA(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → REV2_IN_GGA(X, XS, YS)
REV2_IN_GGA(X, .(Y, YS), ZS) → U4_GGA(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
REV2_IN_GGA(X, .(Y, YS), ZS) → REV2_IN_GGA(Y, YS, US)
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_GGA(X, Y, YS, ZS, rev_in_ga(US, VS))
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → REV_IN_GA(US, VS)
U5_GGA(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_GGA(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U5_GGA(X, Y, YS, ZS, rev_out_ga(US, VS)) → REV_IN_GA(.(X, VS), ZS)

The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x5)
U6_GGA(x1, x2, x3, x4, x5)  =  U6_GGA(x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)
REV1_IN_GGA(x1, x2, x3)  =  REV1_IN_GGA(x1, x2)
REV2_IN_GGA(x1, x2, x3)  =  REV2_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x5)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x5)
REV_IN_GA(x1, x2)  =  REV_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

REV_IN_GA(.(X, XS), .(Y, YS)) → U1_GA(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
REV_IN_GA(.(X, XS), .(Y, YS)) → REV1_IN_GGA(X, XS, Y)
REV1_IN_GGA(X, .(Y, YS), Z) → U3_GGA(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
REV1_IN_GGA(X, .(Y, YS), Z) → REV1_IN_GGA(Y, YS, Z)
U1_GA(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_GA(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
U1_GA(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → REV2_IN_GGA(X, XS, YS)
REV2_IN_GGA(X, .(Y, YS), ZS) → U4_GGA(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
REV2_IN_GGA(X, .(Y, YS), ZS) → REV2_IN_GGA(Y, YS, US)
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_GGA(X, Y, YS, ZS, rev_in_ga(US, VS))
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → REV_IN_GA(US, VS)
U5_GGA(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_GGA(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U5_GGA(X, Y, YS, ZS, rev_out_ga(US, VS)) → REV_IN_GA(.(X, VS), ZS)

The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x5)
U6_GGA(x1, x2, x3, x4, x5)  =  U6_GGA(x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)
REV1_IN_GGA(x1, x2, x3)  =  REV1_IN_GGA(x1, x2)
REV2_IN_GGA(x1, x2, x3)  =  REV2_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x5)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x5)
REV_IN_GA(x1, x2)  =  REV_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 4 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

REV1_IN_GGA(X, .(Y, YS), Z) → REV1_IN_GGA(Y, YS, Z)

The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)
REV1_IN_GGA(x1, x2, x3)  =  REV1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

REV1_IN_GGA(X, .(Y, YS), Z) → REV1_IN_GGA(Y, YS, Z)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
REV1_IN_GGA(x1, x2, x3)  =  REV1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

REV1_IN_GGA(X, .(Y, YS)) → REV1_IN_GGA(Y, YS)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

REV2_IN_GGA(X, .(Y, YS), ZS) → REV2_IN_GGA(Y, YS, US)
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → REV_IN_GA(US, VS)
U1_GA(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → REV2_IN_GGA(X, XS, YS)
U4_GGA(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_GGA(X, Y, YS, ZS, rev_in_ga(US, VS))
REV2_IN_GGA(X, .(Y, YS), ZS) → U4_GGA(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
REV_IN_GA(.(X, XS), .(Y, YS)) → U1_GA(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
U5_GGA(X, Y, YS, ZS, rev_out_ga(US, VS)) → REV_IN_GA(.(X, VS), ZS)

The TRS R consists of the following rules:

rev_in_ga([], []) → rev_out_ga([], [])
rev_in_ga(.(X, XS), .(Y, YS)) → U1_ga(X, XS, Y, YS, rev1_in_gga(X, XS, Y))
rev1_in_gga(X, [], X) → rev1_out_gga(X, [], X)
rev1_in_gga(X, .(Y, YS), Z) → U3_gga(X, Y, YS, Z, rev1_in_gga(Y, YS, Z))
U3_gga(X, Y, YS, Z, rev1_out_gga(Y, YS, Z)) → rev1_out_gga(X, .(Y, YS), Z)
U1_ga(X, XS, Y, YS, rev1_out_gga(X, XS, Y)) → U2_ga(X, XS, Y, YS, rev2_in_gga(X, XS, YS))
rev2_in_gga(X, [], []) → rev2_out_gga(X, [], [])
rev2_in_gga(X, .(Y, YS), ZS) → U4_gga(X, Y, YS, ZS, rev2_in_gga(Y, YS, US))
U4_gga(X, Y, YS, ZS, rev2_out_gga(Y, YS, US)) → U5_gga(X, Y, YS, ZS, rev_in_ga(US, VS))
U5_gga(X, Y, YS, ZS, rev_out_ga(US, VS)) → U6_gga(X, Y, YS, ZS, rev_in_ga(.(X, VS), ZS))
U6_gga(X, Y, YS, ZS, rev_out_ga(.(X, VS), ZS)) → rev2_out_gga(X, .(Y, YS), ZS)
U2_ga(X, XS, Y, YS, rev2_out_gga(X, XS, YS)) → rev_out_ga(.(X, XS), .(Y, YS))

The argument filtering Pi contains the following mapping:
rev_in_ga(x1, x2)  =  rev_in_ga(x1)
[]  =  []
rev_out_ga(x1, x2)  =  rev_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x5)
rev1_in_gga(x1, x2, x3)  =  rev1_in_gga(x1, x2)
rev1_out_gga(x1, x2, x3)  =  rev1_out_gga(x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
rev2_in_gga(x1, x2, x3)  =  rev2_in_gga(x1, x2)
rev2_out_gga(x1, x2, x3)  =  rev2_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
U6_gga(x1, x2, x3, x4, x5)  =  U6_gga(x5)
REV2_IN_GGA(x1, x2, x3)  =  REV2_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x5)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x5)
REV_IN_GA(x1, x2)  =  REV_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

REV2_IN_GGA(X, .(Y, YS)) → U4_GGA(X, rev2_in_gga(Y, YS))
U5_GGA(X, rev_out_ga(VS)) → REV_IN_GA(.(X, VS))
REV_IN_GA(.(X, XS)) → U1_GA(X, XS, rev1_in_gga(X, XS))
U4_GGA(X, rev2_out_gga(US)) → REV_IN_GA(US)
REV2_IN_GGA(X, .(Y, YS)) → REV2_IN_GGA(Y, YS)
U1_GA(X, XS, rev1_out_gga(Y)) → REV2_IN_GGA(X, XS)
U4_GGA(X, rev2_out_gga(US)) → U5_GGA(X, rev_in_ga(US))

The TRS R consists of the following rules:

rev_in_ga([]) → rev_out_ga([])
rev_in_ga(.(X, XS)) → U1_ga(X, XS, rev1_in_gga(X, XS))
rev1_in_gga(X, []) → rev1_out_gga(X)
rev1_in_gga(X, .(Y, YS)) → U3_gga(rev1_in_gga(Y, YS))
U3_gga(rev1_out_gga(Z)) → rev1_out_gga(Z)
U1_ga(X, XS, rev1_out_gga(Y)) → U2_ga(Y, rev2_in_gga(X, XS))
rev2_in_gga(X, []) → rev2_out_gga([])
rev2_in_gga(X, .(Y, YS)) → U4_gga(X, rev2_in_gga(Y, YS))
U4_gga(X, rev2_out_gga(US)) → U5_gga(X, rev_in_ga(US))
U5_gga(X, rev_out_ga(VS)) → U6_gga(rev_in_ga(.(X, VS)))
U6_gga(rev_out_ga(ZS)) → rev2_out_gga(ZS)
U2_ga(Y, rev2_out_gga(YS)) → rev_out_ga(.(Y, YS))

The set Q consists of the following terms:

rev_in_ga(x0)
rev1_in_gga(x0, x1)
U3_gga(x0)
U1_ga(x0, x1, x2)
rev2_in_gga(x0, x1)
U4_gga(x0, x1)
U5_gga(x0, x1)
U6_gga(x0)
U2_ga(x0, x1)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


REV_IN_GA(.(X, XS)) → U1_GA(X, XS, rev1_in_gga(X, XS))
U4_GGA(X, rev2_out_gga(US)) → REV_IN_GA(US)
REV2_IN_GGA(X, .(Y, YS)) → REV2_IN_GGA(Y, YS)
The remaining pairs can at least be oriented weakly.

REV2_IN_GGA(X, .(Y, YS)) → U4_GGA(X, rev2_in_gga(Y, YS))
U5_GGA(X, rev_out_ga(VS)) → REV_IN_GA(.(X, VS))
U1_GA(X, XS, rev1_out_gga(Y)) → REV2_IN_GGA(X, XS)
U4_GGA(X, rev2_out_gga(US)) → U5_GGA(X, rev_in_ga(US))
Used ordering: Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x2   
POL(REV2_IN_GGA(x1, x2)) = 1 + x2   
POL(REV_IN_GA(x1)) = 1 + x1   
POL(U1_GA(x1, x2, x3)) = 1 + x2   
POL(U1_ga(x1, x2, x3)) = 1 + x2 + x3   
POL(U2_ga(x1, x2)) = 1 + x2   
POL(U3_gga(x1)) = 1   
POL(U4_GGA(x1, x2)) = 1 + x2   
POL(U4_gga(x1, x2)) = 1 + x2   
POL(U5_GGA(x1, x2)) = 1 + x2   
POL(U5_gga(x1, x2)) = 1 + x2   
POL(U6_gga(x1)) = x1   
POL([]) = 0   
POL(rev1_in_gga(x1, x2)) = 1   
POL(rev1_out_gga(x1)) = 1   
POL(rev2_in_gga(x1, x2)) = 1 + x2   
POL(rev2_out_gga(x1)) = 1 + x1   
POL(rev_in_ga(x1)) = 1 + x1   
POL(rev_out_ga(x1)) = 1 + x1   

The following usable rules [17] were oriented:

U5_gga(X, rev_out_ga(VS)) → U6_gga(rev_in_ga(.(X, VS)))
rev1_in_gga(X, .(Y, YS)) → U3_gga(rev1_in_gga(Y, YS))
U4_gga(X, rev2_out_gga(US)) → U5_gga(X, rev_in_ga(US))
U3_gga(rev1_out_gga(Z)) → rev1_out_gga(Z)
rev2_in_gga(X, .(Y, YS)) → U4_gga(X, rev2_in_gga(Y, YS))
rev_in_ga([]) → rev_out_ga([])
U1_ga(X, XS, rev1_out_gga(Y)) → U2_ga(Y, rev2_in_gga(X, XS))
rev2_in_gga(X, []) → rev2_out_gga([])
U2_ga(Y, rev2_out_gga(YS)) → rev_out_ga(.(Y, YS))
rev_in_ga(.(X, XS)) → U1_ga(X, XS, rev1_in_gga(X, XS))
rev1_in_gga(X, []) → rev1_out_gga(X)
U6_gga(rev_out_ga(ZS)) → rev2_out_gga(ZS)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

REV2_IN_GGA(X, .(Y, YS)) → U4_GGA(X, rev2_in_gga(Y, YS))
U5_GGA(X, rev_out_ga(VS)) → REV_IN_GA(.(X, VS))
U1_GA(X, XS, rev1_out_gga(Y)) → REV2_IN_GGA(X, XS)
U4_GGA(X, rev2_out_gga(US)) → U5_GGA(X, rev_in_ga(US))

The TRS R consists of the following rules:

rev_in_ga([]) → rev_out_ga([])
rev_in_ga(.(X, XS)) → U1_ga(X, XS, rev1_in_gga(X, XS))
rev1_in_gga(X, []) → rev1_out_gga(X)
rev1_in_gga(X, .(Y, YS)) → U3_gga(rev1_in_gga(Y, YS))
U3_gga(rev1_out_gga(Z)) → rev1_out_gga(Z)
U1_ga(X, XS, rev1_out_gga(Y)) → U2_ga(Y, rev2_in_gga(X, XS))
rev2_in_gga(X, []) → rev2_out_gga([])
rev2_in_gga(X, .(Y, YS)) → U4_gga(X, rev2_in_gga(Y, YS))
U4_gga(X, rev2_out_gga(US)) → U5_gga(X, rev_in_ga(US))
U5_gga(X, rev_out_ga(VS)) → U6_gga(rev_in_ga(.(X, VS)))
U6_gga(rev_out_ga(ZS)) → rev2_out_gga(ZS)
U2_ga(Y, rev2_out_gga(YS)) → rev_out_ga(.(Y, YS))

The set Q consists of the following terms:

rev_in_ga(x0)
rev1_in_gga(x0, x1)
U3_gga(x0)
U1_ga(x0, x1, x2)
rev2_in_gga(x0, x1)
U4_gga(x0, x1)
U5_gga(x0, x1)
U6_gga(x0)
U2_ga(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 4 less nodes.